package com.xbongbong.saas.model;

import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.pro.domain.entity.AiAssistantHistoryEntity;

import java.util.List;
import java.util.Map;

/**
 * @description: 智能助手历史记录
 * @author hongxiao
 * @date: 2019-05-09 21:55
 * @since v1.0
 */
public interface AiAssistantHistoryModel extends IModel<AiAssistantHistoryEntity> {
    /**
     * 保存设置
     *
     * @param entity 实体
     * @return
     * @throws
     * @author hongxiao
     * @date: 2019-05-09 21:55
     * @since v1.0
     * @version v1.0
     */
    Integer save(AiAssistantHistoryEntity entity);
    /**
     * 批量插入
     *
     * @param entityList 实体列表
     * @return
     * @throws
     * @author hongxiao
     * @date: 2019-05-09 21:55
     * @since v1.0
     * @version v1.0
     */
    void insertBatch(List<AiAssistantHistoryEntity> entityList);

    @Override
    List<AiAssistantHistoryEntity> findEntitys(Map<String, Object> param);

    /**
     * 获取实体
     *
     * @param key 智能助手id
     * @param corpid 公司id
     * @return
     * @throws
     * @author hongxiao
     * @date: 2019-05-09 21:55
     * @since v1.0
     * @version v1.0
     */
    AiAssistantHistoryEntity getByKey(Long key, String corpid);
    /**
     * 批量失效
     * @param
     * @return
     * @throws
     * @author hongxiao
     * @date 2019-05-22 14:36
     * @since v1.0
     * @version v1.0
     */
    void invalidBatch(String corpid, List<Long> idIn);
    /**
     * 批量更新
     * @param list 实体列表
     * @@param corpid 公司id
     * @return
     * @throws
     * @author hongxiao
     * @date 2019-05-24 10:20
     * @since v1.0
     * @version v1.0
     */
    void updateBatch(List<AiAssistantHistoryEntity> list, String corpid);
}
